<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link rel="stylesheet" type="text/css" href="skin/css/mui.min.css" />
    <link rel="stylesheet" type="text/css" href="skin/css/base.css" />
    <link rel="stylesheet" type="text/css" href="skin/fonts/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="skin/css/homepage.css" />
    <script src="skin/js/mui.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="skin/js/jquery-3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="skin/js/echarts.js" type="text/javascript" charset="utf-8"></script>
    <script src="skin/js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="skin/js/base.js" type="text/javascript" charset="utf-8"></script>
    <!--分割线-->
    <link rel="stylesheet" type="text/css" href="skin/css/progresscircle.css" />
    <script src="skin/js/base64.js" type="text/javascript" charset="utf-8"></script>
    <style type="text/css">
        .top-stage3 .SuccessstageCont svg {
            display: none;
        }
        
        .dai-qi {
            display: flex;
            align-items: center;
        }
        
        .dai-qi>div {
            display: flex;
            flex: 1 1 0;
            align-items: center;
            border-bottom: 1px solid #eee;
        }
        
        .dai-qi>div>input {
            padding: 0;
            margin: 0;
            border: none;
            outline: none;
            font-size: 13px;
            text-align: center;
        }
    </style>
    <title>首页</title>
</head>

<body>
    <div id="app">
        <div ref="box" class="box" style="padding-top:0;">
            <div class="homepage-box">
                <div class="homepage-header">
                    <div class="header" id="header" onselectstart="return false">
                        <div class="header-content">
                            <span @tap="close"><i class="iconfont icon-fanhui"></i></span>
                            <div></div>
                            <!-- <span @tap="plus.webview.open('GameRules.html')" style="right: 0px;top:0px;justify-content: flex-end;padding-right: 20px;padding-left: 0px;"><i class="iconfont icon-wenhao1"></i></span> -->
                        </div>
                    </div>
                </div>
                <!--顶部栏-->
                <div class="homepage-body" id="refreshContainer">
                    <div class="mui-scroll">
                        <div class="boxBcImg">
                            <div class="homepage-top">
                                <div class="top-progress">
                                    <div class="progress"></div>
                                    <div class="progressImg">
                                        <img src="skin/img/juxing.png" class="aa" />
                                    </div>
                                    <div class="NumberOfOeriods">
                                        <div class="stage-cont" @tap="stageData=2;LookState=2;OpenAprizeLook();">
                                            <div class="text-state">已开奖</div>
                                            <div :class="{'contImg':true, 'active':LookState==2}"><img src="skin/img/jd1.png" /></div>
                                            <div class="text-stage" v-if="game.length!=0">{{OpenAprizeGame[2].roundnumber}}</div>
                                        </div>
                                        <div class="stage-cont" @tap="stageData=1;LookState=1;">
                                            <div class="text-state">待开奖</div>
                                            <div :class="{'contImg':true, 'active':LookState==1}"><img src="skin/img/jd2.png" /></div>
                                            <div class="text-stage" v-if="game.length!=0">{{OpenAprizeGame[1].roundnumber}}</div>
                                        </div>
                                        <div class="stage-cont" @tap="stageData=0;LookState=0;">
                                            <div class="text-state">竞猜中</div>
                                            <div :class="{'contImg':true, 'active':LookState==0}"><img src="skin/img/jd3.png" /></div>
                                            <div class="text-stage" v-if="game.length!=0">{{OpenAprizeGame[0].roundnumber}}</div>
                                        </div>
                                    </div>
                                </div>
                                <!--进度-->
                                <span class="hide" :aa="LookState"></span>
                                <div class="top-stage 1" v-if="stageData==0">
                                    <div class="top-text">
                                        <div v-if="game.length!=0">第{{OpenAprizeGame[stageData].roundnumber}}期</div>
                                        <p>（竞猜中）</p>
                                    </div>
                                    <div class="top-stageContent" v-if="game.length!=0">
                                        <div class="stageCont">
                                            <div class="stageContImg1"><img src="skin/img/wenhao.png" /></div>
                                            <div class="stageContImg2"><img src="skin/img/jingcaizhong.png" /></div>
                                        </div>
                                        <div v-if="stageData==0" class="top-stageCont circlechart" :data-percentage='100/10*(game[9].roundnumber-AllData.cblock-5)' aclass="stroke-BlueAndGreen" style="left: 0;right: 0;bottom: 0;top: 0;">
                                            <svg class="circle-chart" viewBox="0 0 33.83098862 33.83098862">
												<circle class="circle-chart__background" cx="16.9" cy="16.9" r="15.9"></circle>
												<circle class="circle-chart__circle stroke-BlueAndGreen circle-chart__circle--negative"  :stroke-dasharray="100/10*(5-(game[9].roundnumber-AllData.cblock))+',100'" cx="16.9" cy="16.9" r="15.9"></circle>
												<g class="circle-chart__info">   
													<text class="circle-chart__percent" x="17.9" y="15.5"></text> 
												</g>
											</svg>
                                        </div>
                                    </div>
                                    <div class="bottom-text">
                                        <div v-if="game[stageData]" :aa="dateTimes(game[stageData].start_time)">已经开始{{dateTimes(game[stageData].start_time)}}</div>
                                        <p>哈希值： 未生成，请等待<span>...</span></p>
                                    </div>
                                </div>
                                <div class="top-stage 2" v-else-if="stageData==1">
                                    <div class="top-text">
                                        <div v-if="game.length!=0">第{{game[stageData].roundnumber}}期</div>
                                        <p>（待开奖）</p>
                                    </div>
                                    <div class="top-stageContent" v-if="game.length!=0">
                                        <div class="stageCont">
                                            <!--(待开奖)-->
                                            <div class="stageContImg1"><img src="skin/img/wenhao.png" /></div>
                                            <div class="stageContImg2"><img src="skin/img/daikaijing.png" /></div>
                                        </div>
                                        <div v-if="stageData==1" class="top-stageCont circlechart" :data-percentage='100/10*(5+(game[9].roundnumber-AllData.cblock))' aclass="stroke-orange">
                                            <svg class="circle-chart" viewBox="0 0 33.83098862 33.83098862">
												<circle class="circle-chart__background" cx="16.9" cy="16.9" r="15.9"></circle>
												<circle class="circle-chart__circle stroke-green circle-chart__circle--negative" :stroke-dasharray="100/10*(10-(game[9].roundnumber-AllData.cblock))+',100'" cx="16.9" cy="16.9" r="15.9"></circle>
												<g class="circle-chart__info">   
													<text class="circle-chart__percent" x="17.9" y="15.5"></text> 
												</g>
											</svg>

                                        </div>
                                    </div>
                                    <div class="bottom-text">
                                        <div v-if="game[stageData]">已经开始{{dateTimes(game[stageData].start_time)}}</div>
                                        <p>哈希值： 已生成，结算中<span>...</span></p>
                                    </div>
                                </div>
                                <div class="top-stage top-stage3" v-else>
                                    <div class="top-text">
                                        <div v-if="game.length!=0">第{{game[stageData].roundnumber}}期</div>
                                        <p>（已开奖）</p>
                                    </div>
                                    <div class="top-stageContent">
                                        <div :class="{'top-stageCont':true, 'background-blue':game[stageData].result>=5,'background-orange':game[stageData].result<=4}"></div>
                                        <div class="SuccessstageCont">
                                            <div class="SuccessstageContImg1" v-if="game[stageData].result==0"><img src="skin/img/0.png" /></div>
                                            <div class="SuccessstageContImg1" v-else-if="game[stageData].result==1"><img src="skin/img/1.png" /></div>
                                            <div class="SuccessstageContImg1" v-else-if="game[stageData].result==2"><img src="skin/img/2.png" /></div>
                                            <div class="SuccessstageContImg1" v-else-if="game[stageData].result==3"><img src="skin/img/3.png" /></div>
                                            <div class="SuccessstageContImg1" v-else-if="game[stageData].result==4"><img src="skin/img/4.png" /></div>
                                            <div class="SuccessstageContImg1" v-else-if="game[stageData].result==5"><img src="skin/img/5.png" /></div>
                                            <div class="SuccessstageContImg1" v-else-if="game[stageData].result==6"><img src="skin/img/6.png" /></div>
                                            <div class="SuccessstageContImg1" v-else-if="game[stageData].result==7"><img src="skin/img/7.png" /></div>
                                            <div class="SuccessstageContImg1" v-else-if="game[stageData].result==8"><img src="skin/img/8.png" /></div>
                                            <div class="SuccessstageContImg1" v-else-if="game[stageData].result==9"><img src="skin/img/9.png" /></div>
                                            <div class="SuccessstageContImg2">
                                                <img src="skin/img/seDa.png" v-if="game[stageData].attr[0]=='大'" />
                                                <img src="skin/img/seXiao.png" v-else-if="game[stageData].attr[0]=='小'" />
                                                <img src="skin/img/seDan.png" v-else-if="game[stageData].attr[0]=='单'" />
                                                <img src="skin/img/seShuang.png" v-else-if="game[stageData].attr[0]=='双'" />
                                                <img class="dian" src="skin/img/Dian.png" />
                                                <img src="skin/img/seDa.png" v-if="game[stageData].attr[2]=='大'" />
                                                <img src="skin/img/seXiao.png" v-else-if="game[stageData].attr[2]=='小'" />
                                                <img src="skin/img/seDan.png" v-else-if="game[stageData].attr[2]=='单'" />
                                                <img src="skin/img/seShuang.png" v-else-if="game[stageData].attr[2]=='双'" />
                                            </div>
                                        </div>
                                    </div>

                                    <div class="bottom-text2">
                                        <div class="bottom-text2Content">哈希值：{{game[stageData].hash}}<span class="yellow">{{OpenAprizeLookVal}}</span></div>
                                    </div>
                                </div>
                                <!--第几期-->
                                <div class="top-LineGraph">
                                    <div class="LineGraphContent">
                                        <div class="LineGraphContentTitle">
                                            <div class="LineGraphContentTitleL" style='opacity: 0;'>
                                                总下单人数：<span class="green" v-if="game.length!=0">{{cugame.all_total_user}}</span>人
                                            </div>
                                            <div class="LineGraphContentTitler">
                                                总投注Spor:<span class="blue" v-if="game.length!=0">{{cugame.all_total_money}}</span>Spor
                                            </div>
                                        </div>
                                        <div class="LineGraphContent-chart">
                                            <div class="LineGraphContent-chart-title">往期开奖结果统计</div>
                                            <div class="LineGraphContent-chartContent" id="LineGraphContent-chartContent"></div>
                                        </div>
                                    </div>
                                </div>
                                <!--线图-->
                            </div>
                            <!--分割线-->
                            <div class="homepage-bottom">
                                <div class="bottom-Bets">
                                    <div class="bottom-BetsContent">
                                        <div class="top-text">
                                            <div v-if="game.length!=0">竞猜中：{{OpenAprizeGame[0].roundnumber}} 期</div>
                                            <p>可用余额：{{balance.ethmoney}} Spor</p>
                                        </div>
                                        <div class="WrittenWordsNotes">
                                            <div class="WrittenWords" v-bind:class="{active:num==10}" @tap="num=10;BetsType=1;BetsSeed=1;">
                                                <div class="contImg">
                                                    <img src="skin/img/Bsda.png" v-if="num==10" />
                                                    <img src="skin/img/da.png" v-else />
                                                </div>
                                                <p class="text1">5~9</p>
                                                <p class="text2">赔率: 1:{{AllData.dxds}}</p>
                                            </div>
                                            <div class="WrittenWords" v-bind:class="{active:num==11}" @tap="num=11;BetsType=1;BetsSeed=2;">
                                                <div class="contImg">
                                                    <img src="skin/img/Bsxiao.png" v-if="num==11" />
                                                    <img src="skin/img/xiao.png" v-else />
                                                </div>
                                                <p class="text1">0~4</p>
                                                <p class="text2">赔率: 1:{{AllData.dxds}}</p>
                                            </div>
                                            <div class="WrittenWords" v-bind:class="{active:num==12}" @tap="num=12;BetsType=1;BetsSeed=3;">
                                                <div class="contImg">
                                                    <img src="skin/img/Bsdan.png" v-if="num==12" />
                                                    <img src="skin/img/dan.png" v-else />
                                                </div>
                                                <p class="text1">1、3、5、7、9</p>
                                                <p class="text2">赔率: 1:{{AllData.dxds}}</p>
                                            </div>
                                            <div class="WrittenWords" v-bind:class="{active:num==13}" @tap="num=13;BetsType=1;BetsSeed=4;">
                                                <div class="contImg">
                                                    <img src="skin/img/Bsshuang.png" v-if="num==13" />
                                                    <img src="skin/img/shuang.png" v-else />
                                                </div>
                                                <p class="text1">0、2、4、6、8</p>
                                                <p class="text2">赔率: 1:{{AllData.dxds}}</p>
                                            </div>
                                        </div>
                                        <!--文字注-->
                                        <div class="bottom-BetsContentTips">数字赔率：1:{{AllData.num}}</div>
                                        <div class="numberNotes">
                                            <div class="cont" v-bind:class="{active:num==0}" @tap="num=0;BetsType=2;BetsSeed=0;">0</div>
                                            <div class="cont" v-bind:class="{active:num==1}" @tap="num=1;BetsType=2;BetsSeed=1;">1</div>
                                            <div class="cont" v-bind:class="{active:num==2}" @tap="num=2;BetsType=2;BetsSeed=2;">2</div>
                                            <div class="cont" v-bind:class="{active:num==3}" @tap="num=3;BetsType=2;BetsSeed=3;">3</div>
                                            <div class="cont" v-bind:class="{active:num==4}" @tap="num=4;BetsType=2;BetsSeed=4;">4</div>
                                            <div class="cont" v-bind:class="{active:num==5}" @tap="num=5;BetsType=2;BetsSeed=5;">5</div>
                                            <div class="cont" v-bind:class="{active:num==6}" @tap="num=6;BetsType=2;BetsSeed=6;">6</div>
                                            <div class="cont" v-bind:class="{active:num==7}" @tap="num=7;BetsType=2;BetsSeed=7;">7</div>
                                            <div class="cont" v-bind:class="{active:num==8}" @tap="num=8;BetsType=2;BetsSeed=8;">8</div>
                                            <div class="cont" v-bind:class="{active:num==9}" @tap="num=9;BetsType=2;BetsSeed=9;">9</div>
                                        </div>
                                        <!--数字下注-->
                                        <div class="bottom-BetsInput">
                                            <div class="QuantityOfBets">投注数量</div>
                                            <div class="BetsInput"><input type="number" pattern="[0-9]*" v-model="Number" value="1" /><span>Spor</span></div>
                                            <span class="AdditionAndSubtraction" @tap="Number=parseFloat(_accAdd(Number,0.01))" style="border-right: 1px solid #D2D2D2;"><i class="iconfont icon-jiajianzujianjiahao"></i></span>
                                            <span class="AdditionAndSubtraction" @tap="reduce();"><i class="iconfont icon-jianshao"></i></span>
                                        </div>
                                        <!--输入下注量-->
                                        <div class="bottom-Bets-btn-Content">
                                            <button class="btn1" @tap="if(Number==0){toast('购买数量不能为0');return;};goPay();">购买</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--下注-->
                        </div>
                        <div class="homepage-bottom">
                            <div class="bottom-bottom">
                                <div class="bottom-bottomTap">
                                    <div class="bottomTap" v-bind:class="{active:hometap==1}" @tap="ProgressCircle()">开奖</div>
                                    <div class="bottomTap bottomTap2" v-bind:class="{active:hometap==2}" @tap="hometap=2;RecordFC();">记录</div>
                                    <div class="bottomTap" v-bind:class="{active:hometap==4}" @tap="hometap=4;">钱包</div>
                                </div>
                                <!--底部的tap选项卡-->
                                <div class="bottom-bottomContent">
                                    <div class="OpenAprize" v-if="hometap==1">
                                        <div class="OpenAprize-Content" v-for="(item,index) in OpenAprizeGame">
                                            <div class="ContentL">
                                                <div class="stage">
                                                    <span class="S1">{{item.roundnumber}}</span>
                                                    <span class="S2 background-BlueAndGreen" v-if="index==0" :index="index">竞猜中</span>
                                                    <span class="S2 background-orange" v-else-if="index==1" :index="index">待开奖</span>
                                                    <span class="S2 background-pink" v-else :index="index">已开奖</span>
                                                </div>
                                                <div class="time" v-if="index==0" :index="index">已开始{{dateTimes(item.start_time)}}</div>
                                                <div class="time" v-else-if="index==1">已开始{{dateTimes(item.start_time)}}</div>
                                                <div class="time" v-else>{{dateTimes(item.end_time)}}前开奖</div>
                                                <div class="data">
                                                    <span class="">本期投资 {{item.total_user}} 人</span>
                                                    <span class="">投资金额 {{item.total_money}} Spor</span>
                                                </div>
                                            </div>

                                            <div class="ContentR" :a="item.attr" v-if="index==1">
                                                <div class="ContentR-Cont">
                                                    <div class="cont1 circlechart" data-percentage="5" aclass="stroke-orange">
                                                        <svg class="circle-chart" viewBox="0 0 33.83098862 33.83098862">
															<circle class="circle-chart__background" cx="16.9" cy="16.9" r="15.9"></circle>
															<circle class="circle-chart__circle stroke-green circle-chart__circle--negative" :num="game[9].roundnumber-AllData.cblock" :stroke-dasharray="100/10*(10-(game[9].roundnumber-AllData.cblock))+',100'" cx="16.9" cy="16.9" r="15.9"></circle>
															<g class="circle-chart__info">   
																<text class="circle-chart__percent" x="17.9" y="15.5"></text> 
															</g>
														</svg>
                                                    </div>
                                                    <div class="cont2">
                                                        <div class="row1"><i class="iconfont icon-wenhao"></i></div>
                                                        <div class="row2">待开奖</div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="ContentR" v-else-if="index==0">
                                                <div class="ContentR-Cont">
                                                    <div data-percentage="5" aclass="stroke-BlueAndGreen" class="cont1 circlechart">
                                                        <svg viewBox="0 0 33.83098862 33.83098862" class="circle-chart">
															<circle cx="16.9" cy="16.9" r="15.9" class="circle-chart__background"></circle>
															<circle :num="game[9].roundnumber-AllData.cblock" :stroke-dasharray="100/10*(5-(game[9].roundnumber-AllData.cblock))+',100'" cx="16.9" cy="16.9" r="15.9" class="circle-chart__circle stroke-BlueAndGreen circle-chart__circle--negative"></circle>
															<g class="circle-chart__info">
																<text x="17.9" y="15.5" class="circle-chart__percent"></text>
															</g>
														</svg>
                                                    </div>
                                                    <div class="cont2">
                                                        <div class="row1"><i class="iconfont icon-wenhao"></i></div>
                                                        <div class="row2">竞猜中</div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="ContentR" :a="item.attr" v-else>
                                                <div class="ContentR-Cont">
                                                    <div :class="{'cont1':true,'background-blue':9>=item.result&&item.result>=5,'background-orange':4>=item.result&&item.result>=0}">{{item.result}}</div>
                                                </div>
                                            </div>
                                        </div>

                                        <!--暂无数据时-->
                                        <div class="no-data hide">
                                            <div><img src="skin/img/zanwushuju.png" /></div>
                                            <p>暂无数据</p>
                                        </div>
                                    </div>
                                    <!--开奖-->
                                    <div class="Record" v-if="hometap==2">
                                        <div class="Record-Content">
                                            <div class="Record-Content-heade">
                                                <span class="w1">期数</span>
                                                <span class="w2">买入类型</span>
                                                <span class="w3">总买入Spor</span>
                                                <span class="w4">开奖结果</span>
                                                <span class="w5">收益情况</span>
                                            </div>
                                            <div class="Record-Content-box" v-if="RecordVal.length>0">
                                                <div class="Record-Content-body" v-for="(Item,index) in RecordVal">
                                                    <!-- <div class="Record-Content-content 'Record-Content-content'+(index+1)" :ref="'Record-Content-content'+(index+1)" @tap="Record('Record-Content-content'+(index+1))">
                                                                    <div class="cont1 w1 cont">
                                                                        <img src="./img/down.svg" width="15px" height="15px">
                                                                        <span>{{Item.roundnumber}}</span>
                                                                    </div>
                                                                    <div class="cont2 w2 cont">{{Item.roundnum}}</div>
                                                                    <div class="cont3 w3 cont">{{Item.rounduser}}</div>
                                                                    <div class="cont4 w4 cont orange">{{Item.text}}</div>
                                                                    <div class="cont5 w5 cont"  v-text='parseFloat(Item.roundtotal).toFixed(6)'>12145.123456</div>
                                                                </div> -->
                                                    <div class='dai-qi' :ref="'Record-Content-content'+(index+1)" @tap="Record('Record-Content-content'+(index+1))">
                                                        <div>
                                                            <img src="./img/down.svg" width="13px" height="13px">
                                                            <input type="text" readonly style="width:100%;" :value='Item.roundnumber'>
                                                        </div>
                                                        <div>
                                                            <input type="text" readonly style="width:100%;" :value='Item.roundnum'>
                                                        </div>
                                                        <div>
                                                            <input type="text" readonly style="width:100%;" :value='parseFloat(Item.rounduser).toFixed(3)'>
                                                        </div>
                                                        <div>
                                                            <input type="text" readonly style="width:100%;color:#f48f38;" :value='Item.text'>
                                                        </div>
                                                        <div>
                                                            <input type="text" readonly style="width:100%;" :value='Item.roundtotal'>
                                                        </div>
                                                    </div>

                                                    <div class="Record-Content-bottom">
                                                        <div class="Record-Content-bottom-content" v-for="(Item2,index) in Item.child">
                                                            <div class="cont1 wd1 cont">{{Item2.addtime}}</div>
                                                            <div class="cont2 wd2 cont">
                                                                <div v-if="Item2.reattr.length!=0" :class="{'row':true,'background-green':Item2.reattr.length!=0&&Item2.result==1,'background-orange':Item2.reattr.length!=0&&Item2.result==2,'background-blue':Item2.reattr.length!=0&&Item2.result==3,'background-Mud':Item2.reattr.length!=0&&Item2.result==4}">
                                                                    {{Item2.reattr}}
                                                                </div>
                                                                <div v-else :class="{'row':true,'background-green':Item2.result>=5,'background-orange':Item2.result<=4}">
                                                                    {{Item2.result}}
                                                                </div>
                                                            </div>
                                                            <div class="cont3 wd3 cont">{{Item2.price}}</div>
                                                            <div class="cont5 wd4 cont">{{Item2.profit}}</div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <!-- <div class="NoMoreData hide">无更多数据</div> -->
                                            </div>
                                            <!--暂无数据时-->
                                            <div class="no-data" id='jiazai' v-if="RecordVal.length==0">
                                                <div><img src="skin/img/zanwushuju.png" /></div>
                                                <p id='jiazaifont'>加载中....</p>
                                            </div>
                                        </div>
                                    </div>
                                    <!--记录-->
                                    <!--金库-->
                                    <div class="wallet" v-if="hometap==4">
                                        <div class="wallet-Content">
                                            <div class="wallet-ContentBox">
                                                <div class="wallet-ContentBox-Title">钱包余额</div>
                                                <div class="wallet-ContentBox-number" style="padding-bottom: 0px;">{{balance.ethmoney}}Spor</div>
                                                <div class="wallet-ContentBox-Title">游戏收益</div>
                                                <div class="wallet-ContentBox-number" style="color: #000000;font-size: 16px;">{{balance.gamemoney}}Spor</div>
                                                <div class="wallet-ContentBox-Title">邀请收益</div>
                                                <div class="wallet-ContentBox-number" style="color: #000000;font-size: 16px;">{{balance.userinvite}}Spor</div>
                                                <div class="wallet-ContentBox-input">{{daiAddress}}</div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--钱包-->
                                </div>
                            </div>
                        </div>
                        <!--分割线-->
                    </div>
                </div>
            </div>
        </div>
        <!--弹窗-->
        <div class="Popup" v-if="PursePurchase" @tap="PursePurchase=false;walletPurchaseVal='';">
            <!--钱包支付-->
            <div class="bottomPopup-content PursePurchase" @tap.stop="Null">
                <div class="top-title">钱包支付</div>
                <div class="cont1">
                    <span class="S1">订单类型</span>
                    <span class="S2">转账</span>
                </div>
                <div class="cont1 cont1-Two">
                    <span class="S1">支付地址</span>
                    <span class="S2">{{daiAddress}}</span>
                </div>
                <div class="cont2">
                    <span>手续费</span>
                    <span v-text='comOtherMoney'>1 Spor</span>
                </div>
                <div class="cont2">
                    <span>金额</span>
                    <!--<span>{{balance.userprofit}} ETH</span>-->
                    <span v-text="Number+'Spor'"></span>
                </div>
                <div class="input-content">
                    <span class="S1"><i class="iconfont icon-lock"></i></span>
                    <span class="S2" @tap="walletEye=!walletEye"><i v-bind:class="{'iconfont':true,'icon-yanjing-bi':!walletEye,'icon-yanjing':walletEye}"></i></span>
                    <input :type="!walletEye?'password':'text'" placeholder="请输入PIN码" v-model="walletPurchaseVal" />
                </div>
                <div class="btn-content">
                    <button @tap="walletPurchase">确定</button>
                    <!--PursePurchase=false-->
                </div>
            </div>
        </div>
        <!--金库支付-->
        <!-- <div class="Popup" v-if="TreasuryPurchase" @tap="TreasuryPurchase=false;VaultPurchaseVal='';">
            <div class="bottomPopup-content PursePurchase" @tap.stop="Null">
                <div class="top-title">金币支付</div>
                <div class="cont1">
                    <span class="S1">订单类型</span>
                    <span class="S2">转账</span>
                </div>
                <div class="cont1 cont1-Two">
                    <span class="S1">支付地址</span>
                    <span class="S2">{{daiAddress}}</span>
                </div>
                <div class="cont2">
                    <span>手续费</span>
                    <span>1 ETH</span>
                </div>
                <div class="cont2">
                    <span>金额</span>
                    <span>{{balance.userprofit}} ETH</span>
                    <span v-text="Number+'ETH'"></span>
                </div>
                <div class="input-content">
                    <span class="S1"><i class="iconfont icon-lock"></i></span>
                    <span class="S2" @tap="VaultEye=!VaultEye"><i v-bind:class="{'iconfont':true,'icon-yanjing-bi':VaultEye,'icon-yanjing':!VaultEye}"></i></span>
                    <input :type="!VaultEye?'password':'text'" placeholder="请输入PIN码" v-model="VaultPurchaseVal" />
                </div>
                <div class="btn-content">
                    <button @tap="VaultPurchase">确定</button>
                </div>
            </div>
        </div> -->
        <!--提现到钱包-->
        <!-- <div class="Popup" v-if="CashInWallet" @tap="CashInWallet=false">
            <div class="bottomPopup-content" @tap.stop="Null">
                <div class="top-title">提现信息</div>
                <div class="cont1">
                    <span class="S1">订单类型</span>
                    <span class="S2">提现</span>
                </div>
                <div class="cont1">
                    <span class="S1">提现地址</span>
                    <span class="S2">{{userinfo.Address}}</span>
                </div>
                <div class="cont2">
                    <span>手续费</span>
                    <span>1 ETH</span>
                </div>
                <div class="cont2">
                    <span>金额</span>
                    <span>{{balance.userprofit}} ETH</span> 
                </div>
                <div class="input-content">
                    <span class="S1"><i class="iconfont icon-lock"></i></span>
                    <span class="S2" @tap="PutForwardEye=!PutForwardEye"><i v-bind:class="{'iconfont':true,'icon-yanjing-bi':PutForwardEye,'icon-yanjing':!PutForwardEye}"></i></span>
                    <input :type="!PutForwardEye?'password':'text'" placeholder="请输入PIN码" v-model="CashInWalletVal" />
                </div>
                <div class="btn-content">
                    <button @tap="CashInWalletFC">确定</button>
                </div>
            </div>
        </div> -->
        <!-- 请备份   输入PIN码-->
        <!-- <div class="Popup" v-if="inputPIN" @tap="inputPIN=false;inputPINval='';">
            <div class="Popup-content" @tap.stop="Null">
                <div class="input-content">
                    <span class="S1"><i class="iconfont icon-lock"></i></span>
                    <span class="S2" @tap="Eye=!Eye"><i v-bind:class="{'iconfont':true,'icon-yanjing-bi':Eye,'icon-yanjing':!Eye}"></i></span>
                    <input :type="!Eye?'password':'text'" placeholder="请输入PIN码" v-model="inputPINval" />
                </div>
                <div class="input-btn-content"><button @tap="backups">确定</button></div>
            </div>
        </div> -->
        <!--失败-->
        <!-- <div class="Popup" v-if="tips==1" @tap="tips=0">
            <div class="Popup-content" @tap.stop="Null">
                <div class="top-text-I yellow"><i class="iconfont icon-cuowutishi"></i></div>
                <div class="tips-center-text">对不起，导入失败，请检查PIN码是否正确！</div>
                <div class="tips-btn-content">
                    <button @tap="tips=0">我知道了</button>
                </div>
            </div>
        </div> -->
        <!--成功-->
        <!-- <div class="Popup" v-if="tips==2" @tap="tips=0">
            <div class="Popup-content" @tap.stop="Null">
                <div class="top-text-I green"><i class="iconfont icon-zhengque"></i></div>
                <div class="tips-center-text">恭喜你，导入成功，即将开启你的专属旅程！</div>
                <div class="tips-btn-content">
                    <button @tap="tips=0">我知道了</button>
                </div>
            </div>
        </div> -->
        <!--更新-->
        <!-- <div class="Popup hide">
            <div class="ToUpdatePopup-content" @tap.stop="Null">
                <div class="ToUpdate-headImg">
                    <img src="skin/img/gengxin.png" />
                </div>
                <div class="ToUpdate-centerText">
                    <div class="cont-text">
                        {"status":1,"Auth":true,"Google":true,"Alipay":true,"Bank":true,"RealName":"陈佳炜"}
                    </div>
                </div>
                <div class="btn-cozntent">
                    <button>立即更新</button>
                </div>
            </div>
        </div> -->
        <!--邀请解锁输入PIN码-->
        <!-- <div class="Popup" v-if="InvitationUnlock" @tap="InvitationUnlock=false;">
            <div class="Popup-content" @tap.stop="Null">
                <div class="input-content">
                    <span class="S1"><i class="iconfont icon-lock"></i></span>
                    <span class="S2" @tap="Eye=!Eye"><i v-bind:class="{'iconfont':true,'icon-yanjing-bi':Eye,'icon-yanjing':!Eye}"></i></span>
                    <input :type="!Eye?'password':'text'" placeholder="请输入PIN码" v-model="InvitationUnlockVal" />
                </div>
                <div class="input-btn-content"><button @tap="InvitationUnlockFC">确定</button></div>
            </div>
        </div> -->
        <div class="Popup PopupImg" v-if="loding">
            <img src="skin/img/loding.gif" class="loding" />
            <p class="PopupImgTips">加载中.....</p>
        </div>
    </div>
</body>
<script type="text/javascript">
    var app = new Vue({
        el: "#app",
        data: {
            daiAddress: localStorage.getItem('daiAddress'),
            LookState: 9,
            cugame: '', //统计图
            num: 0, //下注买奖的种类
            hometap: 1,
            Receivables: false, //收款 				
            TransferRecord: 1, //查看转账记录
            turnout: 1, //转入转出
            Number: 0.01, //购买数量
            PursePurchase: false, //钱包购买
            TreasuryPurchase: false, //金库购买
            // CashInWallet: false, //提现到钱包
            CashInWalletVal: "",
            inputPIN: false, //输入PIN码
            inputPINval: "", //PIN码  值 备份那点的
            tips: false, //提示

            ImportNewWallet: false, //导入新钱包
            // InvitationUnlock: false, //邀请解锁
            InvitationUnlockVal: "",
            //				眼睛
            Eye: false, //PIN眼睛(就一个PIN)
            walletEye: false, //钱包眼睛
            VaultEye: false, //金库眼睛
            PutForwardEye: false, //提现到钱包眼睛
            loding: true,
            scroll: "",
            game: "",
            OpenAprizeGame: "",
            //				下注购买
            BetsType: 2, //1大小单双  2数字
            Betspaytype: "", //1eth购买，2分红购买
            BetsSeed: 0,
            // userinfo: "", //存储的用户信息
            balance: "",
            VaultPurchaseVal: "", //金币支付的密码
            AllData: "", //所以数据
            RecordVal: [], //记录
            stageData: 0, //期(数据展示大圈圈)
            walletPurchaseVal: "", //钱包购买的密码  ETH
            // TransferRecordVal: "", //转账记录
            chartVal: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], //图值
            RecordJudgeSW: true, //记录判是否加载
            RecordPageNum: 1, //记录页码
            // TransferAccounts: 1, //转账记录页码
            OpenAprizeLookVal: "", //哈希值  最后一个数字
            // WarehouseDescriptionNum: "",
        },
        mounted: function() {
            var self = this;
            var myChart;
            console.log(DAI_GET_GAME)
            $.ajax({
                type: "get",
                url: DAI_GET_GAME, //获取游戏信息
                data: {},
                success: function(data) {
                	
                	console.log(JSON.stringify(data));
                    self.loding = false;
                    self.game = data.game;
                    var sortArry = data.game;
                    self.OpenAprizeGame = sortArry.reverse();
                    self.cugame = data.cugame;
                    self.chartVal = [self.cugame.big, self.cugame.small, self.cugame.single, self.cugame.double, self.cugame.num0, self.cugame.num1, self.cugame.num2, self.cugame.num3, self.cugame.num4, self.cugame.num5, self.cugame.num6, self.cugame.num7, self.cugame.num8, self.cugame.num9];
                    self.AllData = data;
                    option = {
                        color: ['#3398DB'],
                        tooltip: {
                            trigger: 'axis',
                            axisPointer: { // 坐标轴指示器，坐标轴触发有效
                                type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
                            }
                        },
                        grid: {
                            left: '3%',
                            right: '4%',
                            top: '10%',
                            bottom: '3%',
                            containLabel: true
                        },
                        xAxis: [{
                            type: 'category',
                            data: ['大', '小', '单', '双', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
                            axisTick: {
                                alignWithLabel: true
                            },
                            axisLabel: {
                                textStyle: {
                                    color: '#fff'
                                }
                            },
                            axisTick: {
                                show: false
                            },
                            axisLine: {
                                show: false
                            },
                        }],
                        yAxis: [{
                            type: 'value',
                            allowDecimals: false,
                            splitNumber: 1,
                            axisLine: {
                                show: false
                            },
                            axisTick: {
                                show: false
                            },
                            axisLabel: {
                                textStyle: {
                                    color: '#fff'
                                }
                            }
                        }],
                        dataZoom: [{
                            type: 'inside'
                        }],
                        series: [{
                            name: '直接访问',
                            type: 'bar',
                            barWidth: '60%',
                            data: self.chartVal,
                        }]
                    };
                    if (myChart != null && myChart != "" && myChart != undefined) {
                        myChart.dispose();
                    };
                    myChart = echarts.init(document.getElementById('LineGraphContent-chartContent'));
                    myChart.setOption(option);
                },
                error: function() {

                }
            });
            $.ajax({
                type: "post",
                url: DAI_GET_BALANCE, //获取用户信息
                data: {
                    address: self.daiAddress,
                },
                success: function(data) {
                    console.log(DAI_GET_BALANCE);
                    console.log(self.daiAddress)
                    console.log(JSON.stringify(data))
                    self.balance = data;
                },
            });
            //						分割线
            if (self.stageData == 7) {
                var Strval = self.game[self.stageData].hash;
                var bb = Strval.split("");
                var reg = /^[0-9]+.?[0-9]*$/;
                var str = [];
                for (var i = 0; i < bb.length; i++) {
                    if (/^[0-9]+.?[0-9]*$/.test(bb[i])) {
                        str.push(bb[i]);
                    };
                };
                self.OpenAprizeLookVal = str[str.length - 1];
            };
            //					分割线
            setInterval(function() {
                $.ajax({
                    type: "get",
                    url: DAI_GET_GAME, //获取游戏信息
                    data: {},
                    success: function(data) {
                        // self.balance.last_profit
                        self.loding = false;
                        self.game = data.game;
                        var sortArry = data.game;
                        var daiso = sortArry.reverse()
                        if (daiso[2].roundnumber != self.OpenAprizeGame[2].roundnumber) {
                            setTimeout(function() {
                                var zhongMon = parseFloat(String(self.balance.last_profit));
                                if (zhongMon > 0) {
                                    alert('恭喜你中奖' + (zhongMon) + 'Spor');
                                }
                            }, 3000);
                        }
                        self.OpenAprizeGame = daiso;
                        self.cugame = data.cugame;
                        self.chartVal = [self.cugame.big, self.cugame.small, self.cugame.single, self.cugame.double, self.cugame.num0, self.cugame.num1, self.cugame.num2, self.cugame.num3, self.cugame.num4, self.cugame.num5, self.cugame.num6, self.cugame.num7, self.cugame.num8, self.cugame.num9];
                        self.AllData = data;
                        option = {
                            color: ['#3398DB'],
                            tooltip: {
                                trigger: 'axis',
                                axisPointer: { // 坐标轴指示器，坐标轴触发有效
                                    type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
                                }
                            },
                            grid: {
                                left: '3%',
                                right: '4%',
                                top: '10%',
                                bottom: '3%',
                                containLabel: true
                            },
                            xAxis: [{
                                type: 'category',
                                data: ['大', '小', '单', '双', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
                                axisTick: {
                                    alignWithLabel: true
                                },
                                axisLabel: {
                                    textStyle: {
                                        color: '#fff'
                                    }
                                },
                                axisTick: {
                                    show: false
                                },
                                axisLine: {
                                    show: false
                                },
                            }],
                            yAxis: [{
                                type: 'value',
                                allowDecimals: false,
                                splitNumber: 1,
                                axisLine: {
                                    show: false
                                },
                                axisTick: {
                                    show: false
                                },
                                axisLabel: {
                                    textStyle: {
                                        color: '#fff'
                                    }
                                }
                            }],
                            dataZoom: [{
                                type: 'inside'
                            }],
                            series: [{
                                name: '直接访问',
                                type: 'bar',
                                barWidth: '60%',
                                data: self.chartVal,
                            }]
                        };
                        if (myChart != null && myChart != "" && myChart != undefined) {
                            myChart.dispose();
                        };
                        myChart = echarts.init(document.getElementById('LineGraphContent-chartContent'));
                        myChart.setOption(option);
                    },
                    error: function() {

                    }
                });
                $.ajax({
                    type: "post",
                    url: DAI_GET_BALANCE, //获取用户信息
                    data: {
                        address: self.daiAddress,
                    },
                    success: function(data) {
                        self.balance = data;
                    },
                    error: function() {

                    }
                });
                //						分割线
                if (self.stageData == 7) {
                    var Strval = self.game[self.stageData].hash;
                    var bb = Strval.split("");
                    var reg = /^[0-9]+.?[0-9]*$/;
                    var str = [];
                    //							console.log(bb.replace(/[^0-9]/ig,""))
                    for (var i = 0; i < bb.length; i++) {
                        if (/^[0-9]+.?[0-9]*$/.test(bb[i])) {
                            str.push(bb[i]);
                        };
                    };
                    self.OpenAprizeLookVal = str[str.length - 1];
                };

            }, 10000);
            setTimeout(function() {
                self.echartsFC(this.cugame)
            }, 1000);
            //				};
        },
        computed: {
            comOtherMoney: function() {
                var other = this.Number * this.AllData.wprice;
                if (other < this.AllData.dwprice) {
                    return this.AllData.dwprice + 'Spor';
                } else {
                    return other + 'Spor';
                }
            }
        },
        watch:{
        	Number:function(val){
        		var str=String(val);
        		var index=str.indexOf('.');
        		if(index!= -1){
        			var right=str.slice(index);
        			if(right.length>3){
        				str=str.slice(0,index+3);
        				this.Number=str;
        			}
        		}
        	}
        },
        methods: {
            Null: function() {},
            daiGetData: function() {
                var self = this;
                var myChart;

                $.ajax({
                    type: "get",
                    url: DAI_GET_GAME, //获取游戏信息
                    data: {},
                    success: function(data) {
                        self.loding = false;
                        self.game = data.game;
                        var sortArry = data.game;
                        self.OpenAprizeGame = sortArry.reverse();
                        self.cugame = data.cugame;
                        self.chartVal = [self.cugame.big, self.cugame.small, self.cugame.single, self.cugame.double, self.cugame.num0, self.cugame.num1, self.cugame.num2, self.cugame.num3, self.cugame.num4, self.cugame.num5, self.cugame.num6, self.cugame.num7, self.cugame.num8, self.cugame.num9];
                        self.AllData = data;
                        option = {
                            color: ['#3398DB'],
                            tooltip: {
                                trigger: 'axis',
                                axisPointer: { // 坐标轴指示器，坐标轴触发有效
                                    type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
                                }
                            },
                            grid: {
                                left: '3%',
                                right: '4%',
                                top: '10%',
                                bottom: '3%',
                                containLabel: true
                            },
                            xAxis: [{
                                type: 'category',
                                data: ['大', '小', '单', '双', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
                                axisTick: {
                                    alignWithLabel: true
                                },
                                axisLabel: {
                                    textStyle: {
                                        color: '#fff'
                                    }
                                },
                                axisTick: {
                                    show: false
                                },
                                axisLine: {
                                    show: false
                                },
                            }],
                            yAxis: [{
                                type: 'value',
                                allowDecimals: false,
                                splitNumber: 1,
                                axisLine: {
                                    show: false
                                },
                                axisTick: {
                                    show: false
                                },
                                axisLabel: {
                                    textStyle: {
                                        color: '#fff'
                                    }
                                }
                            }],
                            dataZoom: [{
                                type: 'inside'
                            }],
                            series: [{
                                name: '直接访问',
                                type: 'bar',
                                barWidth: '60%',
                                data: self.chartVal,
                            }]
                        };
                        if (myChart != null && myChart != "" && myChart != undefined) {
                            myChart.dispose();
                        };
                        myChart = echarts.init(document.getElementById('LineGraphContent-chartContent'));
                        myChart.setOption(option);
                    },
                    error: function() {

                    }
                });
                $.ajax({
                    type: "post",
                    url: DAI_GET_BALANCE, //获取用户信息
                    data: {
                        address: self.daiAddress,
                    },
                    success: function(data) {
                        self.balance = data;
                        // var ftstr = (self.balance.userprofit * 1880).toString();
                        // var numstr = parseInt(ftstr);
                        // var len = 0;
                        // if (ftstr.split('.')[1]) {
                        //     len = (ftstr.split('.')[1]).substring(0, 2);
                        // };
                        // self.WarehouseDescriptionNum = numstr + len;
                        // setItem("InvaiteCode", data.InvaiteCode);
                    },
                    error: function() {

                    }
                });
                //						分割线
                if (self.stageData == 7) {
                    var Strval = self.game[self.stageData].hash;
                    var bb = Strval.split("");
                    var reg = /^[0-9]+.?[0-9]*$/;
                    var str = [];
                    //							console.log(bb.replace(/[^0-9]/ig,""))
                    for (var i = 0; i < bb.length; i++) {
                        if (/^[0-9]+.?[0-9]*$/.test(bb[i])) {
                            str.push(bb[i]);
                        };
                    };
                    self.OpenAprizeLookVal = str[str.length - 1];
                };

            },
            reduce: function() {
                var self = this;
                if (parseFloat(self.Number) <= 0) {
                    //如果文本框的值小于1,则设置值为1
                    self.Number = 0;
                } else {
                    self.Number = parseFloat(_accSub(self.Number,0.01));
                };
            },
            // OpenAprizeFC: function() { //开奖
            //     mui('#refreshContainer').pullRefresh().disablePullupToRefresh();
            // },
            RecordFC: function() { //记录
                // this.RecordFCpullup();
                //              var self = this;
                this.RecordPageNum = 1;
                this.RecordVal = [];
                this.RecordFCpullup();
                mui('#refreshContainer').pullRefresh().enablePullupToRefresh();
            },
            // VaultFC: function() { //金库
            //     mui('#refreshContainer').pullRefresh().disablePullupToRefresh();
            // },
            walletFC: function() { //钱包
                //              var self = this;
                // mui('#refreshContainer').pullRefresh().endPullupToRefresh(true);

                mui('#refreshContainer').pullRefresh().disablePullupToRefresh();
            },
            // InvitationFC: function() { //邀请
            //     mui('#refreshContainer').pullRefresh().disablePullupToRefresh();
            // },
            ProgressCircle: function() {
                this.hometap = 1;
                // mui('#refreshContainer').pullRefresh().disablePullupToRefresh();
            },
            Record: function(el) {
                var str = this.$refs[el];
                if ($(str).next('.Record-Content-bottom').is(":hidden")) {
                    $(".Record-Content-body").removeClass("active");
                    $(".Record-Content-body .Record-Content-bottom").hide();
                    $(str).parent(".Record-Content-body").addClass("active");
                    $(str).next('.Record-Content-bottom').show();
                } else {
                    $(str).parent(".Record-Content-body").removeClass("active");
                    $(str).next('.Record-Content-bottom').hide();
                };
            },
            //去支付
            goPay: function() {
                if (parseFloat(this.Number) != this.Number || String(this.Number).indexOf('-') != -1) {
                    toast('请输入正确的数量');
                    this.Number = 0;
                    return;
                }
                this.PursePurchase = true;
            },
            dateTimes: function(times) {
                var d = new Date(times * 1000);
                var date = (d.getFullYear()) + "-" + (d.getMonth() + 1) + "-" + (d.getDate()) + "-" + (d.getHours()) + ":" + (d.getMinutes()) + ":" + (d.getSeconds());
                var startTime = date;
                var currTime = new Date(); //当前时间 
                //将xxxx-xx-xx的时间格式，转换为 xxxx/xx/xx的格式 
                startTime = startTime.replace(/\-/g, "/");
                var sTime = new Date(startTime);
                var totalTime = currTime.getTime() - d.getTime();
                var days = parseInt(totalTime / parseInt(1000 * 60 * 60 * 24));
                totalTime = totalTime % parseInt(1000 * 60 * 60 * 24);
                var hours = parseInt(totalTime / parseInt(1000 * 60 * 60));
                totalTime = totalTime % parseInt(1000 * 60 * 60);
                var minutes = parseInt(totalTime / parseInt(1000 * 60));
                totalTime = totalTime % parseInt(1000 * 60);
                var seconds = parseInt(totalTime / parseInt(1000));
                var time = "";
                if (days >= 1) {
                    time = days + "天";
                } else if (hours >= 1) {
                    time = hours + "小时";
                } else if (minutes >= 1) {
                    time = minutes + "分"
                } else {
                    time = seconds + "秒";
                }
                return time;
            },
            // add0: function(m) { //时间戳转化成时间格式
            //     return m < 10 ? '0' + m : m
            // },
            // timeFormat: function(timestamp) {
            //     //timestamp是整数，否则要parseInt转换,不会出现少个0的情况
            //     var time = new Date(timestamp);
            //     var year = time.getFullYear();
            //     var month = time.getMonth() + 1;
            //     var date = time.getDate();
            //     var hours = time.getHours();
            //     var minutes = time.getMinutes();
            //     var seconds = time.getSeconds();
            //     return year + '-' + this.add0(month) + '-' + this.add0(date) + ' ' + this.add0(hours) + ':' + this.add0(minutes) + ':' + this.add0(seconds);
            // },
            // formatDateTime: function(inputTime) {
            //     var date = new Date(1539135952);
            //     var y = date.getFullYear();      
            //     var m = date.getMonth() + 1;      
            //     m = m < 10 ? ('0' + m) : m;      
            //     var d = date.getDate();      
            //     d = d < 10 ? ('0' + d) : d;      
            //     var h = date.getHours();      
            //     h = h < 10 ? ('0' + h) : h;      
            //     var minute = date.getMinutes();      
            //     var second = date.getSeconds();      
            //     minute = minute < 10 ? ('0' + minute) : minute;      
            //     second = second < 10 ? ('0' + second) : second;      
            //     return y + '-' + m + '-' + d + ' ' + '　' + h + ':' + minute + ':' + second;    
            // },
            echartsFC: function(str) {
                var self = this;
                option = {
                    color: ['#3398DB'],
                    tooltip: {
                        trigger: 'axis',
                        axisPointer: { // 坐标轴指示器，坐标轴触发有效
                            type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
                        }
                    },
                    grid: {
                        left: '3%',
                        right: '4%',
                        top: '10%',
                        bottom: '3%',
                        containLabel: true
                    },
                    xAxis: [{
                        type: 'category',
                        data: ['大', '小', '单', '双', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
                        axisTick: {
                            alignWithLabel: true
                        },
                        axisLabel: {
                            textStyle: {
                                color: '#fff'
                            }
                        },
                        axisTick: {
                            show: false
                        },
                        axisLine: {
                            show: false
                        },
                    }],
                    yAxis: [{
                        type: 'value',
                        allowDecimals: false,
                        splitNumber: 1,
                        axisLine: {
                            show: false
                        },
                        axisTick: {
                            show: false
                        },
                        axisLabel: {
                            textStyle: {
                                color: '#fff'
                            }
                        }
                    }],
                    dataZoom: [{
                        type: 'inside'
                    }],
                    series: [{
                        name: '直接访问',
                        type: 'bar',
                        barWidth: '60%',
                        //					            data:[str.big, str.small, str.single, str.double, str.num0, str.num1, str.num2, str.num3, str.num4, str.num5, str.num6, str.num7, str.num8, str.num9]
                        data: self.chartVal,
                    }]
                };
                var myChart = echarts.init(document.getElementById('LineGraphContent-chartContent'));
                myChart.setOption(option);
                //					window.onresize = myChart.resize;
            },
            walletPurchase: function() { //钱包购买
                var self = this;
                var base = new Base64();
//              var addressName = base.encode("address");
                var addressName = base.encode("userid");
                var session = base.encode('session');
                var pinName = base.encode("pin");
                var roundName = base.encode("roundnumber");
                var typeName = base.encode("type");
                var seedName = base.encode("seed");
                var moneyName = base.encode("money");
                var datajson = [];
                var superuser = JSON.parse(localStorage.getItem('user'));
               
//              datajson[addressName] = base.encode(self.daiAddress);
                datajson[addressName] = base.encode(String(superuser.userid));
                datajson[session] = base.encode(superuser.session);
                datajson[pinName] = base.encode(self.walletPurchaseVal);
                datajson[roundName] = base.encode(self.OpenAprizeGame[0].roundnumber.toString());
                datajson[typeName] = base.encode(self.BetsType.toString());
                datajson[seedName] = base.encode(self.BetsSeed.toString());
                datajson[moneyName] = base.encode(self.Number.toString());
                var list = {};
                for (var key in datajson) {
                    list[key] = datajson[key];
                };
                this.loding = true;
                $.ajax({
                    type: "post",
                    url: DAI_GET_ETH, //购买投注
                    data: list,
                    success: function(data) {
                        self.loding = false;
                        self.walletPurchaseVal = "";
                        if (data.status == 1) {
                            toast('购买成功');
                            self.daiGetData();
                            self.PursePurchase = false;
                        } else {
                            toast(data.msg);
                        }
                    },
                    error: function() {

                    }
                });
            },
            // VaultPurchase: function() { //金库购买
            //     var self = this;
            //     var base = new Base64();
            //     var addressName = base.encode("address");
            //     var pinName = base.encode("pin");
            //     var roundName = base.encode("roundnumber");
            //     var typeName = base.encode("type");
            //     var seedName = base.encode("seed");
            //     var moneyName = base.encode("money");
            //     var datajson = [];
            //     datajson[addressName] = base.encode(self.daiAddress);
            //     datajson[pinName] = base.encode(self.VaultPurchaseVal);
            //     datajson[roundName] = base.encode(self.OpenAprizeGame[0].roundnumber.toString());
            //     datajson[typeName] = base.encode(self.BetsType.toString());
            //     datajson[seedName] = base.encode(self.BetsSeed.toString());
            //     datajson[moneyName] = base.encode(self.Number.toString());
            //     var list = {};
            //     for (var key in datajson) {
            //         list[key] = datajson[key];
            //     };
            //     $.ajax({
            //         type: "post",
            //         url: DAI_GET_ETH, //购买投注
            //         async: true,
            //         data: list,
            //         success: function(data) {
            //             self.VaultPurchaseVal = "";
            //             if (data.status == 1) {
            //                 toast('购买成功');
            //                 self.TreasuryPurchase = false;
            //             } else if (data.status == -11) {
            //                 toast('请输入正确的交易密码!');
            //             } else if (data.status == -12) {
            //                 toast('暂无金额!');
            //             } else if (data.status == -100000) {
            //                 toast('发送失败!');
            //             } else if (data.status == -1) {
            //                 toast('余额不足!');
            //             } else if (data.status == -2) {
            //                 toast('购买量不能为负数!');
            //             } else {
            //                 toast('服务器异常');
            //             };
            //         },
            //         error: function() {

            //         }
            //     });
            // },
            // CashInWalletFC: function() { //提现到钱包
            //     var self = this;
            //     if (self.CashInWalletVal.length == 0) {
            //         toast('请输入正确的交易密码!');
            //         return;
            //     };
            //     $.ajax({
            //         type: "post",
            //         url: DAI_WITHDRAW, //提现
            //         async: true,
            //         data: {
            //             address: self.daiAddress, //用户地址
            //             pin: self.CashInWalletVal, //交易密码
            //         },
            //         success: function(data) {
            //             if (data.status == 1) {
            //                 toast('提现成功');
            //                 self.CashInWallet = false;
            //             } else if (data.status == -11) {
            //                 toast('交易密码不正确!');
            //             } else if (data.status == -12) {
            //                 toast('暂无提现金额!');
            //             } else {
            //                 toast('服务器异常');
            //             };
            //         },
            //         error: function() {

            //         }
            //     });
            // },
            // InvitationUnlockFC: function() { //花钱解锁邀请
            //     var self = this;
            //     if (self.InvitationUnlockVal.length == 0) {
            //         toast('请输入正确的交易密码!');
            //         return;
            //     };
            //     var base = new Base64();
            //     var addressName = base.encode("address");
            //     var pinName = base.encode("pin");
            //     var sessionName = base.encode("session");
            //     var datajson = [];
            //     datajson[addressName] = base.encode(self.userinfo.Address);
            //     datajson[pinName] = base.encode(self.InvitationUnlockVal);
            //     datajson[sessionName] = base.encode(self.userinfo.Session);
            //     var list = {};
            //     for (var key in datajson) {
            //         list[key] = datajson[key];
            //     };
            //     $.ajax({
            //         type: "post",
            //         url: DAI_INV, //
            //         data: list,
            //         success: function(data) {
            //             if (data.status == 1) {
            //                 toast('解锁成功');
            //                 self.InvitationUnlock = false;
            //             } else if (data.status == -11) {
            //                 toast('交易密码不正确!');
            //             } else if (data.status == -1) {
            //                 toast('余额不足!');
            //             } else {
            //                 toast('解锁失败！');
            //             };
            //         }
            //     });
            // },
            // backups: function() { //备份
            //     var self = this;
            //     $.ajax({
            //         type: "get",
            //         url: DAI_SEND_PASSWORD, //备份
            //         data: {
            //             pin: self.inputPINval,
            //             address: self.userinfo.Address, //用户地址
            //             session: self.userinfo.Session, //用户session
            //         },
            //         success: function(data) {
            //             if (data.status == 1) {
            //                 self.inputPIN = false;
            //                 toast('备份成功');
            //                 plus.webview.open('BackupMnemonics.html');
            //                 return;
            //             } else {
            //                 toast('备份失败');
            //                 return;
            //             };
            //         }
            //     });
            // },
            pullupRefresh: function() {
                var self = this;
                if (self.hometap == 2) {
                    self.RecordFCpullup();
                } else if (self.hometap == 4) {
                    // self.TransferRecordFCpullup();
                    mui('#refreshContainer').pullRefresh().disablePullupToRefresh();

                } else {
                    mui('#refreshContainer').pullRefresh().disablePullupToRefresh();
                };
            },
            RecordFCpullup: function() { //记录(第二个)
                var self = this;
                $.ajax({
                    type: "post",
                    url: JILU, //底部的记录
                    data: {
                        address: self.daiAddress,
                        page: self.RecordPageNum,
                    },
                    success: function(data) {
                        // console.log('页码' + self.RecordPageNum);
                        // console.log(JSON.stringify(data))
                        if (data.length == 0) {
                            mui('#refreshContainer').pullRefresh().endPullupToRefresh(true);
                            if (self.RecordPageNum == 1) {
                                document.querySelector('#jiazaifont').innerHTML = '暂无更多数据'
                            }
                        } else {
                            for (var i = 0; i < data.length; i++) {
                                self.RecordVal.push(data[i]);
                            }
                            mui('#refreshContainer').pullRefresh().endPullupToRefresh();
                            self.RecordPageNum++;
                        };
                    }
                });
            },
            // TransferRecordFCpullup: function() { //底部的转账记录
            //     var self = this;
            //     $.ajax({
            //         type: "post",
            //         url: DAI_GET_ZHUANC,
            //         data: {
            //             address: self.userinfo.Address,
            //             session: self.userinfo.Session,
            //             page: self.TransferAccounts, //记录的页码
            //         },
            //         success: function(data) {
            //             self.TransferRecordVal = data;
            //             if (data.length == 0) {
            //                 mui('#refreshContainer').pullRefresh().endPullupToRefresh(true);
            //             } else {
            //                 mui('#refreshContainer').pullRefresh().endPullupToRefresh();
            //                 self.TransferAccounts++;
            //             };
            //         },
            //         error: function() {

            //         }
            //     });
            // },
            // LookTurnOutRecord: function() { //查看转出记录
            //     var self = this;
            //     this.TransferRecord = 1;
            //     mui('#refreshContainer').pullRefresh().endPullupToRefresh();
            //     console.log("查看转出记录");
            //     // this.pullupRefresh();
            // },
            OpenAprizeLook: function() {
                console.log('111')
                var self = this;
                var Strval = self.game[self.stageData].hash;
                var bb = Strval.split("");
                var reg = /^[0-9]+.?[0-9]*$/;
                var str = [];
                for (var i = 0; i < bb.length; i++) {
                    if (/^[0-9]+.?[0-9]*$/.test(bb[i])) {
                        str.push(bb[i]);
                    };
                };
                self.OpenAprizeLookVal = str[str.length - 1];
            },
        },

    });

    //		mui事件
    mui.init({
        pullRefresh: {
            container: "#refreshContainer", //下拉刷新容器标识，querySelector能定位的css选择器均可，比如：id、.class等
            up: {
                auto: true, //可选,默认false.自动上拉加载一次
                callback: function() {
                    app.pullupRefresh(app.hometap);
                }
            }
        }
    });
    mui('.refreshContainer').scroll({ //mui-scroll
        deceleration: 0.0005, //flick 减速系数，系数越大，滚动速度越慢，滚动距离越小，默认值0.0006
        bounce: false, //是否启用回弹
    });
    document.addEventListener("touchstart", function(e) {
        if (e.target.tagName.toLowerCase() != "input") {
            var arr = document.getElementsByTagName("input");
            for (var i = 0; i < arr.length; i++) {
                arr[i].blur();
            }
        }
    });
</script>

</html>